package com.atguigu.java;

public class SeasonTest1 {
    public static void main(String[] args) {
        Season1 summer=Season1.SUMMER;
        System.out.println(summer.toString());
        System.out.println("**************");
        Season1[] values = Season1.values();
        for (int i = 0; i < values.length; i++) {
            System.out.println(values[i]);
            System.out.println("*******************");
            Season1 spring = Season1.valueOf("SPRING");
            System.out.println(spring);


        }
        Season1 autumn = Season1.valueOf("AUTUMN");
        autumn.show();


    }
}

interface Info {
    void show();
}
enum Season1 implements Info{
    SPRING("春天","万物复苏"){
        @Override
        public void show() {
            System.out.println("春天在哪里");
        }
    },
    SUMMER("夏天","烈日炎炎"){
        @Override
        public void show() {
            System.out.println("宁静的夏天");
        }
    },
    AUTUMN("秋天","金秋送爽"){
        @Override
        public void show() {
            System.out.println("秋天不回来");
        }
    },
    WINTER("冬天","白雪皑皑"){
        @Override
        public void show() {
            System.out.println("大约在冬季");
        }
    };
    private final String seasonName;
    private final String seasonDesc;




    private Season1(String seasonName,String seasonDesc){
        this.seasonName=seasonName;
         this.seasonDesc=seasonDesc;


    }

    public String getSeasonName() {
        return seasonName;
    }

    public String getSeasonDesc() {
        return seasonDesc;
    }

//    @Override
//    public String toString() {
//        return "Season1{" +
//                "seasonName='" + seasonName + '\'' +
//                ", seasonDesc='" + seasonDesc + '\'' +
//                '}';
//    }
}
